<template>
  <div>
    <FlashTitle  title="产线━━产能━━完成数量━━达成率"
                 :show-left="false"
                 :show-right="false"
                 style="position: absolute;top:30px;margin-left: 5px">
    </FlashTitle>
    <div id="plinelist" style="display: flex;height: 260px;margin-top: 40px" class="overflow-hidden"  >
      <vue-seamless-scroll :class-option="defaultOption" :data="data">
        <ul class="left_boottom">
          <li class="left_boottom_item" v-for="(item, i) in data" :key="i">
            <span class="orderNum doudong" v-if="false">{{ i + 1 }}</span>
            <div class="inner_right">
              <div class="dibu"></div>
              <div class="flex">
                <div class="info">
                  <!--
                  <span class="labels">&nbsp;&nbsp;&nbsp;产线：</span>
                  -->
                  <span class="contents zhuyao doudong wangguan" style="width: 25px;text-align: left">
                  {{ item.pline }}</span>
                  <span class="contents zhuyao doudong wangguan " style="width: 60px;text-align: right" >
                  {{store.fmtNum(item.planQty,10)}}</span>
                  <span class="contents zhuyao doudong wangguan " style="width: 95px;text-align: right" >
                  {{ store.fmtNum(item.completeQty,10)}}</span>

                  <span
                          class="types doudong" style="width: 80px;text-align: right"
                          :class="{
                  typeRed: item.rate<95,
                  typeGreen: item.rate >= 95,
                }"
                  >{{ item.rate.toFixed(2)}}%</span>
                </div>

              </div>
              <!--
              <span
                      class="types doudong"
                      :class="{
                  typeRed: item.onlineState == 0,
                  typeGreen: item.onlineState == 1,
                }"
              >{{ item.onlineState == 1 ? "上线" : "下线" }}</span>


              <div class="info addresswrap">
                <span class="labels">地址：</span>
                <span class="contents ciyao" style="font-size: 12px">
                asdgaksd</span
                >
              </div>-->
            </div>
          </li>
        </ul>
      </vue-seamless-scroll>
  </div>
  </div>
</template>

<script>
  import vueSeamlessScroll from 'vue-seamless-scroll'
  import store from "./store"
  export default {
    props:{
      data:{
      }
    },
    data(){
      return{
        store,
        defaultOption: {
          singleHeight: 240,
          limitMoveNum: 5,
          step: 0,
        },
      }
    },
    components: {
      //cctvChart
      vueSeamlessScroll
    },
    created() {
      window.plinelistVue=this
    },
    methods:{

    }
  }
</script>

<style lang="scss" scoped>
  @import '../../assets/variable.scss';
$box-height: 100%;
$box-width: 100%;
.overflow-y-auto {
  overflow-y: auto;
}
  .overflow-hidden {
    overflow: hidden;
  }
  .doudong {
    //  vertical-align:middle;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
  }
#plinelist {
  padding: 10px 10px 16px 10px;
  height: $box-height;
  width: $box-width;
  border-radius: 5px;
  .bg-color-black {
    //height: $box-height - 35px;
    margin-top: 5px;
    margin-bottom: 5px;
    border-radius: 10px;
  }
  .text {
    color: #c3cbde;
  }
  .chart-box {
    margin-top: 16px;
    width: 170px;
    height: 170px;
    .active-ring-name {
      padding-top: 10px;
    }
  }
}
.left_boottom {
  width: 100%;
  height: 100%;

  .left_boottom_item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    font-size: 10px;
    margin: 10px 0;
    .orderNum {
      margin: 0 16px 0 -20px;
    }

    .info {
      margin-right: 10px;
      display: flex;
      align-items: center;
      color: #fff;

      .labels {
        flex-shrink: 0;
        font-size: 10px;
        color: rgba(255, 255, 255, 0.6);
      }

      .zhuyao {
        color: $primary-color;
        font-size: 10px;
      }

      .ciyao {
        color: rgba(255, 255, 255, 0.8);
      }

      .warning {
        color: #e6a23c;
        font-size: 10px;
      }
    }

    .inner_right {
      position: relative;
      height: 100%;
      /*width: 300px;*/
      flex-shrink: 0;
      line-height: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      .dibu {
        position: absolute;
        height: 1px;
        width: 104%;
        background-image: url("../../assets/img/zuo_xuxian.png");
        bottom: -10px;
        left: -3%;
        background-size: cover;
      }
      .addresswrap {
        width: 100%;
        display: flex;
        margin-top: 8px;
      }
    }

    .wangguan {
      color: #1890ff;
      /*font-weight: 900;*/
      flex-shrink: 0;
    }


    .time {
      font-size: 10px;
      // color: rgba(211, 210, 210,.8);
      color: #fff;
    }

    .address {
      font-size: 10px;
      cursor: pointer;
      // @include text-overflow(1);
    }

    .types {
      width: 30px;
      flex-shrink: 0;
    }

    .typeRed {
      color: #fc1a1a;
    }

    .typeGreen {
      color: #29fc29;
    }
  }
}
</style>
